<!--!
This file is a part of MediaDrop (http://www.mediadrop.net),
Copyright 2009-2013 MediaCore Inc., Felix Schwarz and other contributors.
For the exact contribution history, see the git revision log.
The source code contained in this file is licensed under the GPLv3 or
(at your option) any later version.
See LICENSE.txt in the main project directory, for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include py:for="tmpl in value_of('plugin_templates', ())" href="${tmpl}" />

<head>
	<title>${h.page_title(default=media.title, media=media)}</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<py:choose test="h.config['debug'] and bool(h.request.params.get('debug', False))">
		<py:when test="True">
			<script type="text/javascript" src="${h.url_for('/scripts/goog/base.js')}"></script>
			<script type="text/javascript" src="${h.url_for('/scripts/mcore/deps.js')}"></script>
			<script type="text/javascript" src="${h.url_for('/scripts/mcore/base.js')}"></script>
		</py:when>
		<script py:otherwise="" type="text/javascript" src="${h.url_for('/scripts/mcore-compiled.js')}"></script>
	</py:choose>
	${Markup(h.response.scripts.render())}
	<script py:if="settings.get('google_analytics_uacct', None)" type="text/javascript">
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', '${settings['google_analytics_uacct']}']);
		_gaq.push(['_trackPageview']);
		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	</script>
	<style type="text/css">
		embed, object, iframe, audio, video {display: block}
		body {background: #000; margin: 0; padding: 0; overflow: hidden}
	</style>
</head>

<body>
	${h.media_player(media, width=width, height=height, show_playerbar=False, js_init='function(ctrlr){ ctrlr.setFillScreen(true); }')}
	<script type="text/javascript">
		mcore.initPage();
	</script>
</body>

</html>
